import { defineStore } from "pinia"

const main = defineStore('main',()=>{
    let chatList = ref<any>([])
    let cancel = ref<any>('')
    let askStatus = ref<number>(0)  //当前回答状态
    let askContent = ref<string>('')  //当前回答内容
    let currentChatId = ref<string>('0')  //当前回答的chatid
    let loading = ref<boolean>(false)  //是否展示loading
    return {
        chatList,
        askStatus,
        askContent,
        cancel,
        currentChatId,
        loading
    }
},
// {
//     persist:{
//         enabled:true,
//         // 选择存储方式和内容
//         strategies: [
//             { storage: localStorage,paths: ['chatList']}
//         ]  
//     }
// }
)

export default main